

bool isPalindrome(int x){
    long rs = 0;
    int ret = x;
    while(x)
    {
        rs = rs * 10 + x % 10;
        x = x / 10;
    }
    if(ret == rs && ret >=0)
        return true;
    else
        return false;
}